<?php
namespace app\index\model;
use think\Model;

/**
 * 
 */
class Webconfig extends Model
{
	
	// 指定表名,不含前缀
	protected $name = 'webconfig';

	public static function add($data)
	{
		$Model = new Webconfig();
		$res = $Model->insert($data);
		if($res){
			return $res;
		}
	}

    /**
	* 获取到排序
    */
	public static function getOrderid($data)
	{
		$Model = new Webconfig();
		$orderid = $Model->where('vargroup = '.$data)->max('orderid');
		$orderid += 1;

		return $orderid;
	}
}

?>